<template>
  <el-timeline>
    <el-timeline-item v-for="(item, index) in traceList" :key="index" :timestamp="`${parseTime(item.createTime, '{y}-{m}-{d} {h}:{i}')} ${item.operator}`" placement="top">
      <el-card>
        <h4>{{ item.traceDesc }}</h4>
        <h4 v-if="item.marker">{{ item.marker ? `${item.marker}` : '备注' }}</h4>
        <p>{{ `发生部门&nbsp;——&nbsp;${item.facilityName ? item.facilityName : '系统'}` }}</p>
      </el-card>
    </el-timeline-item>
  </el-timeline>
</template>

<script>
  import { parseTime } from '@/utils'

  export default {
    name: 'circul',
    props: {
      traceList: {
        type: Array,
        required: true
      }
    },
    data() {
      return {
        parseTime
      }
    }
  }
</script>

<style lang="scss" scoped>
.form {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  & /deep/ .el-form-item {
    width: 48%;
    .el-form-item__content > .el-select {
      width: 100%;
    }
  }
  .block {
    width: 100%;
  }
}
.info-title {
  display: flex;
  align-items: center;
  margin-top: 10px;
  margin-bottom: 20px;
  .title-icon {
    display: inline-block;
    width: 4px;
    height: 18px;
    margin-right: 6px;
    background: $themeColor;
  }
  span {
    font-weight: 700;
    color: $themeColor;
  }
}
</style>
